﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain.Model.Repositories;
using Domain.Model.SecretariasDeTransito;
using Domain.Model.Base;
using Domain.Model.Direcciones;
using Domain.Model.LicenciasDeConduccion;

namespace Infrastructure.Base.InMemory
{

    public class MSecretariaDeTransitoRepository : SecretariaDeTransitoRepository
    {
        private Dictionary<SecretariaDeTransitoId, SecretariaDeTransito> lista;

        public MSecretariaDeTransitoRepository()
        {
            this.lista = new Dictionary<SecretariaDeTransitoId, SecretariaDeTransito>();

        }


        public override void Insert(SecretariaDeTransito entity)
        {
            this.lista.Add((SecretariaDeTransitoId)entity.Identity, entity);
        }

        public override SecretariaDeTransito FromId(ObjectIdentity id)
        {
            return this.lista[(SecretariaDeTransitoId)id];
        }

        public override ObjectIdentity NextIdentity()
        {
            return new SecretariaDeTransitoId(Guid.NewGuid().ToString().ToUpper());
        }


        public override void Update(SecretariaDeTransito entity)
        {
            throw new NotImplementedException();
        }

        public override void Remove(ObjectIdentity id)
        {
            this.lista.Remove((SecretariaDeTransitoId)id);
        }

        public override List<SecretariaDeTransito> All()
        {
            return new List<SecretariaDeTransito>(this.lista.Values);
        }

        public override int Count()
        {
            return this.lista.Values.Count;
        }

        public override LicenciaConduccion CreateLicenciaDeConduccion(LicenciaConduccion entity)
        {
            return null;
        }
    }
}
